package com.idealighter.game.roomcard.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.roomcard.manager.RoomCardMgr;
import com.idealighter.game.roomcard.message.ReqRoomCardListMsg;
import com.idealighter.game.server.handler.ReqMessageHandler;

@ReqMsgHandler(ModuleMsgIdConstant.RoomCard.ROOM_CARD_LIST)
public class ReqRoomCardListHandler implements ReqMessageHandler {
  @Inject
  private RoomCardMgr roomCardMgr;

  @Override
  public ResMessage action(Player player, ReqMessage msg) {
    ReqRoomCardListMsg message = (ReqRoomCardListMsg) msg;
    return roomCardMgr.roomCardList(player, message.getType(), message.getLastRoomId(),
        message.getGroupId(), message.getPageSize());
  }
}
